try:
    import pygtk
    pygtk.require("2.0")
except:
    pass
 
try:
	import gtk
	import gtk.glade
except:
    print "Libraries Gtk or Gtk Glade for Python not found. Please install."
    sys.exit(1)

class Widgets:
    def __init__(self,file):
        self.wTree = gtk.glade.XML(file)

    def autoconnect(self, dic):
        self.wTree.signal_autoconnect(dic)

    def __getitem__(self,name):
        return self.wTree.get_widget(name)

    def getItem(self):
        return self.wTree
